package algorithm;

public class leetcode_0026 {
    public int removeDuplicates(int[] nums) {
        int count=1;
        int len=nums.length;
        int left=0;

        for(int i=1;i<len;++i){
            if(nums[left]!=nums[i]){
                left++;
                nums[left]=nums[i];
            }

        }
        return left+1;

    }
}
